import React from 'react';
import {GTable} from 'geminis-react';

export default () => {
  const schema = {
    headerTitle: '默认样式',
    data: {
      url: '/api/users',
      filter: {
        type: 'default'
      },
      include: ['prop1', 'prop2']
    },
    rowSelection: {type: 'checkbox'},
    pagination: {
      defaultPageSize: 5,
    },
    columns: [
      {
        title: 'Name',
        dataIndex: 'name',
        defaultSortOrder: 'descend',
        sorter: {
          multiple: 1
        }
      },
      {
        title: 'Age',
        dataIndex: 'age',
        sorter: {
          multiple: 2
        }
      },
      {
        title: 'Title',
        dataIndex: ['data', 'title']
      },
      {
        title: 'Birthday',
        dataIndex: 'birthday',
        valueType: 'date',
      },
    ],
  };

  return (
    <GTable schema={schema}/>
  );
};
